package com.example.meitao.ui;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Window;
import android.widget.ImageView;

import com.example.meitao.R;

public class VideoActivity extends AppCompatActivity implements View.OnClickListener {

    private Toolbar mToolbar;
    private ImageView iv_video_tb_back;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_video);
        initView();
        setOnListener();
    }

    private void setOnListener() {
        iv_video_tb_back.setOnClickListener(this);
    }

    private void initView() {
        mToolbar = (Toolbar)findViewById(R.id.tb_video);
        setSupportActionBar(mToolbar);
        iv_video_tb_back = (ImageView)findViewById(R.id.iv_video_tb_back);
    }

    @Override
    public void onClick(View view) {
        if(view!=null) {
            switch (view.getId()) {
                case R.id.iv_video_tb_back :
                    finish();
                    break;
            }
        }
    }
}
